Re: [SQL] Using the IN predicate in an UPDATE...

Поиск
Список
Период
Сортировка
От Herouth Maoz
Тема Re: [SQL] Using the IN predicate in an UPDATE...
Дата
Msg-id l03110700b24f63bf94e4@[194.90.105.28]
обсуждение исходный текст
Ответ на Re: [SQL] Using the IN predicate in an UPDATE...  (Thomas Good <tomg@admin.nrnet.org>)
Список pgsql-sql
At 14:37 +0200 on 15/10/98, Thomas Good wrote:


> > Am I missing something here or is this the same as:
> > UPDATE table1 SET id = 2 WHERE id = 1;
> > ??
> >  Les Mikesell
> >    les@mcs.com
>
> 3) Les,  What are ya, some kinda smarta**?  Yeah, somebody was missing
> something, but it weren't you...  ;-)

Hmmm. Are you sure? The original query you presented had different
semantics. It meant "If the recnum has any occurence with id=1, change all
its occurences (even those with id=17) to id=2".

That was the reason why I suggested an "exists" query instead. The above is
only equivalent when each recnum has only one id.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



В списке pgsql-sql по дате отправления:

Предыдущее
От: Vladimir Litovka
Дата:
Сообщение: RE: [SQL] Is this BUG or FEATURE?
Следующее
От: "Michel \\'ZioBudda\\' Morelli"
Дата:
Сообщение: NULL DATE